package com.my.cd.builder;

/**
 * 主体测试类
 */
public class MainTest {

    public static void main(String[] args) {

        CommonBuilderHelper helper = new CommonBuilderHelper(new Common4dBuilder("2015-12-29"));

        helper.build();

        helper.setBuilder(new Common3dBuilder("2015-8-30"));
        helper.build();

        testself();
    }

    private static void testself() {
        DiyBuilder builder = new DiyBuilder("2015-9-29");

        builder.addTicket("Plane Ticket")
                .addEvent("fly to Destination")
                .addEvent("Supper")
                .addHotel("Hilton");

        builder.addDay()
                .addTicket("Zoo Ticket")
                .addEvent("Bus to Zoo")
                .addEvent("Feed animals")
                .addHotel("Home Inn");

        builder.addDay();
        builder.addTicket("Beach");
        builder.addEvent("Swimming");
        builder.addHotel("Home inn");

        builder.addDay()
                .addTicket("Plane Ticket")
                .addEvent("fly to Home");

        builder.getVacation().showInfo();
    }
}
